#include<bits/stdc++.h>
using namespace std;
int n,m;
int mx[105][105];
int flag;
int mv[][2] = {{0,1},{1,0},{-1,0},{0,-1}};
void dfs(int x,int y){
    if(x == n && y == m){
        flag = 1;
        return ;
    }
    for(int i = 0;i < 4;i++){
        int xx = x + mv[i][0];
        int yy = y + mv[i][1];
        if(xx <= 0 || y <= 0 || xx > n || yy > m || mx[xx][yy] == 0){
            continue;
        }
        mx[xx][yy] = 0;
        dfs(xx,yy);
    }
}
int main(){
    cin >> n >> m;
    for(int i = 1;i <= n;i++){
        for(int j = 1;j <= m;j++){
            char c;
            cin >> c;
            if(c == '.') mx[i][j] = 1;
            else mx[i][j] = 0;
        }
    }
    dfs(1,1);
    if(flag) cout << "Yes" << "\n";
    else cout << "No" << "\n";
} 